#include "PCInterrupt.h"
#include "Device.h"
#include "irController.h"

extern int idx;

IRController irController; 

// Note: modify myHardware.h in libraries\device and add change IR_PIN to the value of the pin you have your IR controller on.
void setup()
{
  Serial.begin(9600);
  Serial.println("Started");

   int res = irController.begin(IR_PIN, OTHER_DEVICE);
   if (res != SUCCESS) {Serial.println("error="); Serial.println(res);}
}

void loop(){
  int val = irController.read(); // Returns negative value if no new command rcvd
  if (val >0) Serial.println(val);
  
  delay(500);
}











